import type FormItem from "@/components/form/type/FormItem";
import type TableColumn from "@/components/table/type/TableColumn.ts";

/**
 * 查询条件表单结构数据
 */
export const searchSchema: FormItem[] = [
    {row: 0, span: 4, label: "字典名称", key: "dictName", type: "input", attr:{"clearable": true}},
    {row: 0, span: 4, label: "字典编码", key: "dictCode", type: "input", attr:{"clearable": true}},
    {row: 0, span: 4, label: "操作", key: "operate", type: "slot"},
]

/**
 * 表格结构数据
 */
export const tableColumns: TableColumn[] = [
    {key: "id", title: "序号", width: 80, align: "center", type: "index"},
    {key: "dictName", title: "字典名称", align: "center", type: "string"},
    {key: "dictCode", title: "字典编码", align: "center", type: "string"},
    {key: "createTime", title: "创建时间", align: "center", type: "date"},
    {key: "remark", title: "备注", align: "center", type: "string"},

    {key: "operate", title: "操作", width: 200, type: "slot", align: "center"},
]

/**
 * 字典项表格结构数据
 */
export const itemTableColumns: TableColumn[] = [
    {key: "dictItemText", title: "名称", align: "center", type: "string"},
    {key: "dictItemValue", title: "值", align: "center", type: "string"},
    {key: "remark", title: "备注", align: "center", type: "string"},
    {key: "operate", title: "操作", width: 120, type: "slot", align: "center"},
]

/**
 * dialog结构数据
 */
export const dialogScheme: FormItem[] = [
    {row: 0, span: 12, label: "名称", key: "dictName", placeholder: "字典名称", type: "input"},
    {row: 0, span: 12, label: "编码", key: "dictCode", placeholder: "字典编码", type: "input"},
    {row: 1, span: 12, label: "排序", key: "sortOrder", placeholder: "字段排序", type: "number"},
    {row: 2, label: "备注", key: "remark", placeholder: "备注", type: "textarea"},
]

/**
 * 字典项的dialog结构数据
 */
export const itemDialogScheme: FormItem[] = [
    {row: 0, label: "名称", key: "dictItemText", placeholder: "名称", type: "input"},
    {row: 1, label: "值", key: "dictItemValue", placeholder: "值", type: "input"},
    {row: 2,  label: "排序", key: "sortOrder", placeholder: "排序", type: "number"},
    {row: 3, label: "备注", key: "remark", placeholder: "备注", type: "textarea"},
]